<template>
  <div class="companyFollow" v-if="isFlag">
 <homecoList   v-for="cot in list" :key="cot.coId"   :colist="cot" type="2" />
  </div>
  <van-loading
    size="50px"
    text-size="25px"
    vertical
    v-else
  >加载中...</van-loading>
</template>

<script>
import { getcompanyList } from '@/api/homep'
import homecoList from '@/components/homeco-list'
export default {
  name: 'companyFollow',
  data () {
    return {
      list: [],
      isFlag: false
    }
  },
  components: {
    homecoList
  },
  created () {
    this.firm()
  },
  mounted () {
  },
  methods: {
    async firm () {
      this.isFlag = false
      try {
        const { data } = await getcompanyList({
          follow: true
        })
        console.log(data)
        this.list = data
      } catch (err) {
        console.log(err)
        this.$toast.fail('加载失败')
      }
      this.isFlag = true
    }
    // 点击跳转对应公司详情页
    // getCompanyId (id) {
    //   this.$router.push(`/home/details/${id}`)
    // }
  }
}
</script>

<style scoped lang="less">
.body {
  background-color: #f8f8f8;
}
.box {
  width: 750px;
  height: 288px;
  background-color: #fff;
  // background-color: pink;
  margin-bottom: 12px;
  overflow-x: hidden;

  .van-card__header {
    margin-top: 10px;
    /deep/ .van-card__thumb {
      img {
        border-radius: 0%;
      }
    }
    .van-card__content {
      .van-card__title {
        margin: 15px 0;
      }
      .van-card__desc {
        margin-bottom: 13px;
      }
      .van-tag {
        display: inline-block;
        width: 144px;
        height: 46px;
        line-height: 46px;
        color: #3f51b5;
        text-align: center;
        border-radius: 30px;
        margin-left: 10px;
        margin-top: 20px;
      }
    }
  }
  .box-02 {
    font-size: 24px;
    margin-left: 40px;
    color: #979191;
  }
}
</style>
